﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var cols = [
	{col:{header:'供应商编号', width:100, sortable:true, hidden:true}, field:{name:'pur_provider__provider_code',type:'string'}},
	{col:{header:'*供应商名称', width:197, sortable:true, editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.TriggerField({
			maxLength:50,
			editable:true, allowBlank:false,
			triggerClass:'x-form-search-trigger', 
			onTriggerClick: function() {
				var selcfg = {pageType:'combogrid', nodeId:'provider_select', layoutPage:'', sourceField:';', targetField:';', whereSql:"manage_status = '20'", whereValue:'', whereType:'', isSame:'1', isShowData:'1', isMoreSelect:'0',isReadonly:'0',fieldName:'pur_provider.provider_name'};
				JxSelect.createSelectWin(selcfg, this, 'node_provider_rank_editgrid');
			}
		})}, field:{name:'pur_provider__provider_name',type:'string'}},
	{col:{header:'地址', width:298, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'pur_provider__address',type:'string'}},
	{col:{header:'联系人', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'pur_provider__business_rep',type:'string'}},
	{col:{header:'联系电话', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'pur_provider__rep_phone',type:'string'}},
	{col:{header:'总评分', width:100, sortable:true, align:'right',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.NumberField({
			decimalPrecision:2, maxLength:12
		}),renderer:JxUtil.formatNumber(2)}, field:{name:'pur_provider__score',type:'float'}},
	{col:{header:'名次', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'pur_provider__rank',type:'string'}},
	{col:{header:'采购单ID', width:100, sortable:true, hidden:true}, field:{name:'pur_provider__apply_id',type:'string'}},
	{col:{header:'评标报告ID', width:100, sortable:true, hidden:true}, field:{name:'pur_provider__audit_id',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'pur_provider__pur_provid',type:'string'}},
	{col:{header:'供应商ID', width:100, sortable:true, hidden:true}, field:{name:'pur_provider__provider_id',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '1',
		isshow: '0',
		funid: 'provider_rank'
	};
	
	config.eventcfg = {				//已招标公告		improviders: function(){						var self = this;			//取选择记录的主键值			var params = 'funid='+ self.define.nodeid;						params += '&keyid=' +this.grid.fkValue;						//设置请求的参数			params += '&pagetype=subeditgrid&eventcode=improviders';						//执行处理的内容			var endcall = function(data) {				//重新加载数据				self.grid.getStore().reload();			};			//发送请求			Request.postRequest(params, endcall);		}		
	};
		
	return new Jxstar.GridNode(config);
}